package com.yami.shop.cp.platform.controller;

import com.yami.shop.cp.comment.model.CollaborativePurchaseType;
import com.yami.shop.cp.comment.service.CollaborativePurchaseTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/platform/cp/type")
@Api(tags = "协同采购类型接口")
@AllArgsConstructor
public class CollaborativePurchaseTypeController {

    private final CollaborativePurchaseTypeService collaborativePurchaseTypeService;

    @GetMapping("/info")
    @ApiOperation(value = "协同采购的采购类型详情")
    public ResponseEntity<List<CollaborativePurchaseType>> typeInfo(){
        List<CollaborativePurchaseType> collaborativePurchaseTypes =  collaborativePurchaseTypeService.list();
        return ResponseEntity.ok(collaborativePurchaseTypes);
    }

}
